<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    #l1{color: red}
    .c1{color: green}
    #r2,.c2,input{background-color: yellow}
    body>div>div>p{color: pink}
    /*body div div p{background-color: blue}*/
    div>div>p{background-color: blue}
    a:link{color: green}
    a:visited{color: red}
    a:hover{color: yellow}
    a:active{color: purple}
    </style>
</head>
<body>
<ul>
    <li id="l1">刘备</li>
    <li>关羽</li>
    <li class="c1">张飞</li>
</ul>
<p class="c2">香蕉</p><p class="c1" id="r2">苹果</p>
<input type="text"><input type="password">
<div>
    <p>p1</p>
    <div><p>p2</p></div>
    <div>
        <div>
            <p>p3</p>
            <div>
                <p>p4</p>
            </div>
        </div>
    </div>
</div>
<a href="http://www.qq.com">腾讯</a>
</body>
</html>